#include "Bullet3Common/b3Quaternion.h"
#ifdef __cplusplus
extern "C" {
#endif
b3Quaternion* bullet_Newb3Quaternion(){
	b3Quaternion* wrap_out = new b3Quaternion();
	return wrap_out;
}

b3Quaternion* bullet_Newb3Quaternion1(float* _x,float* _y,float* _z,float* _w){
	b3Scalar const& c_arg__x=(b3Scalar const&)(*_x);
	b3Scalar const& c_arg__y=(b3Scalar const&)(*_y);
	b3Scalar const& c_arg__z=(b3Scalar const&)(*_z);
	b3Scalar const& c_arg__w=(b3Scalar const&)(*_w);
	b3Quaternion* wrap_out = new b3Quaternion(c_arg__x,c_arg__y,c_arg__z,c_arg__w);
	return wrap_out;
}

b3Quaternion* bullet_Newb3Quaternion2(b3Vector3* _axis,float* _angle){
	b3Vector3 const& c_arg__axis=(b3Vector3 const&)(*_axis);
	b3Scalar const& c_arg__angle=(b3Scalar const&)(*_angle);
	b3Quaternion* wrap_out = new b3Quaternion(c_arg__axis,c_arg__angle);
	return wrap_out;
}

b3Quaternion* bullet_Newb3Quaternion3(float* yaw,float* pitch,float* roll){
	b3Scalar const& c_arg_yaw=(b3Scalar const&)(*yaw);
	b3Scalar const& c_arg_pitch=(b3Scalar const&)(*pitch);
	b3Scalar const& c_arg_roll=(b3Scalar const&)(*roll);
	b3Quaternion* wrap_out = new b3Quaternion(c_arg_yaw,c_arg_pitch,c_arg_roll);
	return wrap_out;
}

float bullet_b3Quaternion_angle(b3Quaternion* c_this,b3Quaternion* q){
	b3Quaternion const& c_arg_q=(b3Quaternion const&)(*q);
	b3Scalar c_out = c_this->angle(c_arg_q);
	float wrap_out = (c_out);
	return wrap_out;
}

float bullet_b3Quaternion_dot(b3Quaternion* c_this,b3Quaternion* q){
	b3Quaternion const& c_arg_q=(b3Quaternion const&)(*q);
	b3Scalar c_out = c_this->dot(c_arg_q);
	float wrap_out = (c_out);
	return wrap_out;
}

b3Quaternion* bullet_b3Quaternion_farthest(b3Quaternion* c_this,b3Quaternion* qd){
	b3Quaternion const& c_arg_qd=(b3Quaternion const&)(*qd);
	b3Quaternion c_out = c_this->farthest(c_arg_qd);
	b3Quaternion* wrap_out = new b3Quaternion(c_out);
	return wrap_out;
}

float bullet_b3Quaternion_getAngle(b3Quaternion* c_this){
	b3Scalar c_out = c_this->getAngle();
	float wrap_out = (c_out);
	return wrap_out;
}

b3Vector3* bullet_b3Quaternion_getAxis(b3Quaternion* c_this){
	b3Vector3 c_out = c_this->getAxis();
	b3Vector3* wrap_out = new b3Vector3(c_out);
	return wrap_out;
}

void bullet_b3Quaternion_getEulerZYX(b3Quaternion* c_this,float* yawZ,float* pitchY,float* rollX){
	b3Scalar& c_arg_yawZ=(b3Scalar&)(*yawZ);
	b3Scalar& c_arg_pitchY=(b3Scalar&)(*pitchY);
	b3Scalar& c_arg_rollX=(b3Scalar&)(*rollX);
	c_this->getEulerZYX(c_arg_yawZ,c_arg_pitchY,c_arg_rollX);
}

b3Quaternion* bullet_b3Quaternion_getIdentity(b3Quaternion* c_this){
	b3Quaternion const& c_out = c_this->getIdentity();
	b3Quaternion* wrap_out = (b3Quaternion*)(&c_out);
	return wrap_out;
}

float* bullet_b3Quaternion_getW(b3Quaternion* c_this){
	b3Scalar const& c_out = c_this->getW();
	float* wrap_out = (float*)(&c_out);
	return wrap_out;
}

b3Quaternion* bullet_b3Quaternion_inverse(b3Quaternion* c_this){
	b3Quaternion c_out = c_this->inverse();
	b3Quaternion* wrap_out = new b3Quaternion(c_out);
	return wrap_out;
}

float bullet_b3Quaternion_length(b3Quaternion* c_this){
	b3Scalar c_out = c_this->length();
	float wrap_out = (c_out);
	return wrap_out;
}

float bullet_b3Quaternion_length2(b3Quaternion* c_this){
	b3Scalar c_out = c_this->length2();
	float wrap_out = (c_out);
	return wrap_out;
}

b3Quaternion* bullet_b3Quaternion_nearest(b3Quaternion* c_this,b3Quaternion* qd){
	b3Quaternion const& c_arg_qd=(b3Quaternion const&)(*qd);
	b3Quaternion c_out = c_this->nearest(c_arg_qd);
	b3Quaternion* wrap_out = new b3Quaternion(c_out);
	return wrap_out;
}

b3Quaternion* bullet_b3Quaternion_normalize(b3Quaternion* c_this){
	b3Quaternion& c_out = c_this->normalize();
	b3Quaternion* wrap_out = (b3Quaternion*)(&c_out);
	return wrap_out;
}

b3Quaternion* bullet_b3Quaternion_normalized(b3Quaternion* c_this){
	b3Quaternion c_out = c_this->normalized();
	b3Quaternion* wrap_out = new b3Quaternion(c_out);
	return wrap_out;
}

void bullet_b3Quaternion_setEuler(b3Quaternion* c_this,float* yaw,float* pitch,float* roll){
	b3Scalar const& c_arg_yaw=(b3Scalar const&)(*yaw);
	b3Scalar const& c_arg_pitch=(b3Scalar const&)(*pitch);
	b3Scalar const& c_arg_roll=(b3Scalar const&)(*roll);
	c_this->setEuler(c_arg_yaw,c_arg_pitch,c_arg_roll);
}

void bullet_b3Quaternion_setEulerZYX(b3Quaternion* c_this,float* yawZ,float* pitchY,float* rollX){
	b3Scalar const& c_arg_yawZ=(b3Scalar const&)(*yawZ);
	b3Scalar const& c_arg_pitchY=(b3Scalar const&)(*pitchY);
	b3Scalar const& c_arg_rollX=(b3Scalar const&)(*rollX);
	c_this->setEulerZYX(c_arg_yawZ,c_arg_pitchY,c_arg_rollX);
}

void bullet_b3Quaternion_setRotation(b3Quaternion* c_this,b3Vector3* axis1,float* _angle){
	b3Vector3 const& c_arg_axis1=(b3Vector3 const&)(*axis1);
	b3Scalar const& c_arg__angle=(b3Scalar const&)(*_angle);
	c_this->setRotation(c_arg_axis1,c_arg__angle);
}

b3Quaternion* bullet_b3Quaternion_slerp(b3Quaternion* c_this,b3Quaternion* q,float* t){
	b3Quaternion const& c_arg_q=(b3Quaternion const&)(*q);
	b3Scalar const& c_arg_t=(b3Scalar const&)(*t);
	b3Quaternion c_out = c_this->slerp(c_arg_q,c_arg_t);
	b3Quaternion* wrap_out = new b3Quaternion(c_out);
	return wrap_out;
}

#ifdef __cplusplus
}
#endif
